﻿// -----------------------------------------------------------------------
// <copyright file="_BaseViewModel.cs" company="R&R">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

#region Imports
using System.ComponentModel;
using System.Diagnostics;
#endregion Imports

namespace Domino
{
    public class BaseViewModel : INotifyPropertyChanged
    {
        #region INotifyPropertyChanged implementations
        public event PropertyChangedEventHandler PropertyChanged;
        public void RaisePropertyChanged(string name)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null) handler(this, new PropertyChangedEventArgs(name.Trim()));
        }
        #endregion INotifyPropertyChanged implementations

        #region Properties
        private bool isBusy;
        public bool IsBusy
        {
            get { return isBusy; }
            set { isBusy = value; RaisePropertyChanged("IsBusy"); }
        }

        public bool IsDebug
        {
            get { return Debugger.IsAttached; }
        }
        #endregion Properties
    }
}
